#include <iostream>

using namespace std;
int a,b,sum;
bool iswin = false;

void dfs(int a,int b) {
    sum++;
    if (a % b == 0 || a / b >= 2) {
        return;
    }
    dfs(b,a%b);
}

int main() {
    cin >> a >> b;
    while (a != 0 && b != 0) {
        if (a/b >= 2 || b / a >= 2) {
            cout << "win" << endl;
        }else {
            sum = 0;
            if (a > b) dfs(a,b);
            else dfs(b,a);
            if (sum % 2 == 0) cout << "lose" << endl;
            else cout << "win" << endl;
        }
        cin >> a >> b;
    }
}